From: Jonas Dreßler Date: Thu, 24 Feb 2022 17:57:22 +0000 (+0100) Subject: Revert "status/bluetooth: Bail out and hide UI when there's no adapter" X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~41 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=94d9264d96d05d0796898b15f9f11db26f5599a4;p=gnome-shell.git Revert "status/bluetooth: Bail out and hide UI when there's no adapter" Turns out this broke showing the bluetooth menu entry for adapters which rely on the had-devices-setup property being set while turned off. These adapters are completely removed from the system by the firmware after powering them off, so in that case there is no default adapter anymore, although we still want to show the menu. This reverts commit aaf47167b5bb2a4ac15e2cdfdfcac71498dcd7c7. Part-of: --- diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index 39c2ab62c..187e10635 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -129,20 +129,13 @@ class Indicator extends PanelMenu.SystemIndicator { } _sync() { - const adapterJustAppeared = !this._adapter && this._client.default_adapter; - this._adapter = this._client.default_adapter ?? null; - if (!this._adapter) { - this._item.visible = false; - this._indicator.visible = false; - return; - } - const devices = this._getDeviceInfos(); const connectedDevices = devices.filter(dev => dev.connected); const nConnectedDevices = connectedDevices.length; - if (!adapterJustAppeared) + if (this._client.default_adapter && this._adapter) this._setHadSetupDevices(devices.length > 0); + this._adapter = this._client.default_adapter ?? null; let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;